<?php

require FCPATH . '/application/controllers/frontend.php';

class Search extends Frontend {

    public function __construct() {
	parent::__construct();
	
	$this->load->model('search_model','model');
    }
 
    public function index(){
	$keyword = mysql_real_escape_string(trim($this->input->get('keyword')));
	
	$this->load_css('frontend_search_index');
	$this->load_js('frontend_search_index');
	
	$results = $this->model->records($this->get_language(),$keyword);
	
	$this->rend('search_index',array(
	    'results' => $results
	));
    }
}